// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
THREAD "PROJ1"

REPEAT 
WAIT 0
IF 0AAB: file_exists "CLEO\KEYS.INI"
THEN         
    IF 0AF0: 12@ "CLEO\KEYS.INI" "Projectible_1" "FIRE_KEY"         
    then break                                                                                
    else 0AF1: write_int 54 to_ini_file "CLEO\KEYS.INI" "Projectible_2" "FIRE_KEY"                 
    end
END          
UNTIL IF 0AAB: file_exists "CLEO\KEYS.INI" 

while true
    wait 10
    if OR
       00E1:   player 0 pressed_key 17
       0AB0: 12@ 
    jf continue
    0470: 11@ = actor $PLAYER_ACTOR current_weapon                       
    if or                                                                
    11@ >= 22                                                            
    34 >= 11@                                                           
    jf continue
    IF 
    if 0AB0: KEY_PRESSING: 2 // RIGHT MOUSE BUTTON - AIMING
    THEN
        GOSUB @GET_AIMING_POS1 // RETURNS AIMING AT POSITION TO: 0@ 1@ 2@
        0948: create_explosion_at 0@ 1@ 2@ type { TYPE 1 FIRE} 0 camera_shake 0.1
        continue            
    END                                                               
    if or                                                           
    Actor.Animation($PLAYER_ACTOR) == "RIFLE_CROUCHFIRE"            
    Actor.Animation($PLAYER_ACTOR) == "RIFLE_FIRE"                  
    Actor.Animation($PLAYER_ACTOR) == "RIFLE_FIRE_POOR"             
    then
        GOSUB @GET_AIMING_POS1 // RETURNS AIMING AT POSITION TO: 0@ 1@ 2@
        0948: create_explosion_at 0@ 1@ 2@ type { TYPE 1 FIRE} 0 camera_shake 0.1
        continue            
    end
    if or                                                             
    Actor.Animation($PLAYER_ACTOR) == "2guns_crouchfire"              
    Actor.Animation($PLAYER_ACTOR) == "Colt45_crouchfire"             
    Actor.Animation($PLAYER_ACTOR) == "Colt45_fire"                        
    Actor.Animation($PLAYER_ACTOR) == "Colt45_fire_2hands"            
    then                                                                       
        GOSUB @GET_AIMING_POS1 // RETURNS AIMING AT POSITION TO: 0@ 1@ 2@
        0948: create_explosion_at 0@ 1@ 2@ type { TYPE 1 FIRE} 0 camera_shake 0.1
        continue            
    end                                                              
    if or                                                                    
    Actor.Animation($PLAYER_ACTOR) == "UZI_CROUCHFIRE"                       
    Actor.Animation($PLAYER_ACTOR) == "UZI_FIRE"                             
    Actor.Animation($PLAYER_ACTOR) == "UZI_FIRE_POOR"                        
    then                                                                     
        GOSUB @GET_AIMING_POS1 // RETURNS AIMING AT POSITION TO: 0@ 1@ 2@
        0948: create_explosion_at 0@ 1@ 2@ type { TYPE 1 FIRE} 0 camera_shake 0.1
        continue                                                               
    end 
end

:GET_AIMING_POS1 // PASTE THIS AT THE END OF THE SCRIPT
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
0A9F: 5@ = current_thread_pointer 
5@ += 80 
0A8E: 6@ = 5@ + 12 // int 
0AA6: call_method 5327216 11989032 num_params 6 pop 0 6@ 5@ 3@ 2@ 1@ 4@  
if 
86BD:   not no_obstacles_between 1@ 2@ 3@ and 8@ 9@ 10@ solid 1 car 1 actor 0 object 1 particle 1 
else_jump @ADD1 
jump @END_POS1 

:ADD1
4@ += 1.0 
if
  4@ > 250.0 
else_jump @GET_AIMING_POS1 

:END_POS1
0@ = 0.0
1@ = 0.0
2@ = 0.0
005B: 0@ += 8@ // (float) 
005B: 1@ += 9@ // (float) 
005B: 2@ += 10@ // (float)
4@ = 0.0 // RESET THE AIM RADIUS  
return